package com.rich.user.mapper;

import com.rich.common.entity.TbSuggest;
import com.rich.user.vo.SuggestVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @Package: com.rich.user.mapper
 * @Author: Lin
 * @Date: Created in 2021/8/24 16:23
 */
@Mapper
public interface TbSuggestMapper {

    /**
     * 发送问题
     * @param suggest
     */
    void sendSuggeat(TbSuggest suggest);

    /**
     * 数量
     * @Author: zdy
     * @Date:  下午 8:40
     * @param userId
     * @return java.lang.Integer
     **/
    Integer findSuggestCountByUserId(Long userId);

    /**
     * 全部
     * @Author: zdy
     * @Date:  下午 8:40
     * @param suggestVo
     * @return java.lang.Integer
     **/
    List<TbSuggest> findSuggestAll(SuggestVo suggestVo);

    /**
     * 修改
     * @Author: zdy
     * @Date:  下午 8:43
     * @param id
     * @param status
     * @return void
     **/
    void updSuggestStatusById(@Param("id") Integer id, @Param("status") Integer status);

    /**
     * 查单条
     * @Author: zdy
     * @Date:  下午 8:40
     * @param id
     * @return java.lang.Integer
     **/
    TbSuggest findSuggestById(@Param("id") Integer id);
}
